var LogoLayer = cc.Layer.extend({
    isMouseDown:false,

    ccbNode:null,
    init:function () {

        //////////////////////////////
        // 1. super init first
        this._super();

        /////////////////////////////
        // 2. add a menu item with "X" image, which is clicked to quit the program
        //    you may modify it.
        // ask director the window size
        var size = cc.Director.getInstance().getVisibleSize();
        var size2 =  cc.Director.getInstance().getWinSize();
        console.log("VisibleSize", size);
        console.log("WinSize", size2);

        cc.BuilderReader.setResourcePath("ccb/");

        this.ccbNode = cc.BuilderReader.load("ccb/LogoScene.ccbi", this);
        this.ccbNode.animationManager.runAnimationsForSequenceNamed("start");
        this.ccbNode.animationManager.setCompletedAnimationCallback(this, this.animationCompleteCallback);

        if(this.ccbNode != null) {
            this.addChild(this.ccbNode);
        }
    },
    animationCompleteCallback: function(){
        Game.currScene=new StartScene();
        cc.Director.getInstance().replaceScene(cc.TransitionFade.create(0.5, Game.currScene, cc.black()));
    }
});

var LogoScene = cc.Scene.extend({
    onEnter:function () {
        this._super();
        var layer = new LogoLayer();
        this.addChild(layer);
        layer.init();
    }
});